import time #библиотека учета времени
def BSS (numbers):
    sw=True
    while sw:
        sw=False
        for i in range (len(numbers)-1):
            if numbers [i]>numbers[i+1]:
                numbers[i],numbers[i+1]=numbers[i+1], numbers[i]
                sw=True
def MW(filename):
    file=open(filename, 'r')
    data=file.lines()
    return data
m1=MW("m1_sorted.txt")
m2=MW("m2_reverse.txt")
m3=MW("m3_shuffle.txt")
t_start=time.time()
BSS(m1)
t_finish=time.time()
print("m1_sorted", round((t_finish-t_start)*1000), "milliseconds")
t_start=time.time()
BSS(m2)
t_finish=time.time()
print("m2_reverse"((t_finish-t_start)*1000), "milliseconds")
t_start=time.time()
BSS(m3)
t_finish=time.time()
print("m3_shuffle"((t_finish-t_start)*1000), "milliseconds")
